
<style>
    @media (min-width: 768px){
        .roleList {
            margin-right: 0;
            margin-left: 0;
            background-color: #fff;
            border-color: #ddd;
            border-width: 1px;
            border-radius: 4px 4px 0 0;
            -webkit-box-shadow: none;
            box-shadow: none;
        }
    }
</style>

<ul class="breadcrumb">
    <li>
        <?php
        echo $control->getAjaxLink(array(
            'id' => 'showManageSpace',
            'name' => '管理机构信息'
        ));
        ?>
    </li>
    <li class="active">
        &nbsp;|&nbsp;基本机构关系
    </li>
</ul>

<?php if (isset($actionResult)) { ?>
    <div class="well-small text-danger">
        <?php echo $actionResult; ?>
    </div>
<?php } ?>

<div class="roleList">
    <table class="table table-striped">
        <thead>
            <tr>
                <th>机构名</th>
                <th>机构ID</th>
                <th>是我的</th>
            </tr>
        </thead>
        <tbody>
            <?php
            foreach ($spaceRelationshipView as $id => $list) {
                $spaceName = $list->getItem('spaceName')->getValue();
                $mySpaceId = $list->getItem('mySpaceId')->getValue();
                $relationship = $list->getItem('relationship')->getValue();
                ?>
                <tr>
                    <td><?php echo $spaceName; ?></td>
                    <td><?php echo $mySpaceId; ?></td>
                    <td><?php echo $relationship; ?></td>
                    <td>
                        <?php
                        echo $control->getAjaxLink(array('name' => '删除', 'id' => BUISpaceConn::Delete_Relationship), array(
                            'relationshipId' => $id,
                            'htmlOptions' => array(
                                'class' => ''
                        )));
                        ?>&nbsp;|&nbsp;
                        <?php
                        echo $control->getAjaxLink(array('name' => '修改', 'id' => BUISpaceConn::Show_Add_Relationship), array(
                            'relationshipId' => $id,
                            'htmlOptions' => array(
                                'class' => ''
                        )));
                        ?>
                    </td>
                </tr>
            <?php } ?>
        </tbody>
    </table>
</div>
<div class="roleList">
    <?php
    echo $control->getAjaxLink(array('name' => '新增机构关系', 'id' => BUISpaceConn::Show_Add_Relationship), array('htmlOptions' => array(
            'class' => 'btn btn-success'
    )));
    ?>
</div>